
import { useLaunch } from '@tarojs/taro'
import '@nutui/nutui-react-taro/dist/style.css'
import { initMiniProgramCompat } from './utils/miniProgramCompat'

import './app.less'

function App({ children }) {
  useLaunch(() => {
    console.log('App launched.')
    
    // 初始化小程序兼容性处理
    try {
      initMiniProgramCompat()
      console.log('小程序兼容性处理初始化完成')
    } catch (error) {
      console.error('小程序兼容性处理初始化失败:', error)
    }
  })

  // children 是将要会渲染的页面
  return children
}
  


export default App
